<?php
defined('SYS_IN') OR die('error');
class base{
	
	/**
	 * debug对象
	 **/
	private static $_debug = null;
	
	/**
	 *log对象
	 */
	private static $_log =null;
	
	/**
	 * 获取属性
	 * @param string $name 
	 */
	public function __get($name){
		switch($name){
			case 'debug':
				return self::_getDebug();break;
			case 'log':
				return self::_getLog();	break;
		}
	}
	
	/**
	 * 获取debug对象
	 **/
	private static function _getDebug(){
		if(empty(self::$_debug)){
			self::$_debug = new debug();
		}
		return self::$_debug;
	}
	
	/**
	 * 获取debug对象
	 **/
	private static function _getLog(){
		if(empty(self::$_log)){
			self::$_log = new T_log();
		}
		return self::$_log;
	}
}
?>
